﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace homework5_9
{
    class Program
    {        
        static double Compare(double x, double y, double z)
        {
            double tmp;
            if (x>y)
            { tmp = x; }
            else
            { tmp = y; }
            if (z>tmp)
            { tmp = z; }
            return tmp;       
        }
        static void Main(string[] args)
        {
            double x, y, z;
            Console.WriteLine("请输入第一个实数");
                x = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("请输入第二个实数");
                y = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("请输入第三个实数");
                z = Convert.ToDouble(Console.ReadLine());
            double max = Compare(x, y, z);
            Console.Write("这三个数的最大值是：");
            Console.WriteLine(max);
            Console.ReadLine();






        }
    }
}
